Currently the icon in the top bar indicates the volume level, while
the icon next to the slider indicates the type of output (speaker
or headphone). The speaker- and volume icons are quite similar,
but different enough to feel inconsistent, so use the volume one
in both cases.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5940
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2505>
let muted = this._stream.is_muted;
this._changeSlider(muted
? 0 : this._stream.volume / this._control.get_vol_max_norm());
+ this._updateIcon();
this.emit('stream-updated');
}
this._updateVolume();
}
+ _updateIcon() {
+ this.iconName = this.getIcon();
+ }
+
getIcon() {
if (!this._stream)
return null;
return;
this._hasHeadphones = hasHeadphones;
+ this._updateIcon();
+ }
+
+ _updateIcon() {
this.iconName = this._hasHeadphones
? 'audio-headphones-symbolic'
- : 'audio-speakers-symbolic';
+ : this.getIcon();
}
});